package com.lecture.java8.reflex.fel;

import com.lecture.java8.reflex.annotation.UdFunction;
import com.greenpineyu.fel.function.CommonFunction;

/**
 * @author luyn
 * @version 1.0
 * @description
 * @date 2022/2/7 15:40
 */
@UdFunction(name = "abs")
public class AbsFunction extends CommonFunction {
    @Override
    public Object call(Object[] arguments) {
        System.out.println("获取参数：" + arguments[0]);
        return Double.parseDouble(arguments[0]+"");
    }

    @Override
    public String getName() {
        return "abs";
    }
}
